package com.hailian.fintech.hlfinanceserver.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author wk
 * @since 2020-05-23
 */
@Data
@Accessors(chain = true)
@TableName("hl_moneyplan")
public class Moneyplan extends Model<Moneyplan> {

    private static final long serialVersionUID = 1L;

    /**
     * 收付款计划表id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer consumer_id;

    /**
     * 合同.id(租客关联合同表, 合同关联楼盘表, 楼盘关联房源表)
     */
    private Integer hetong_id;
    /**
     * 支付方式
     */
    private Integer paytype_id;
    /**
     * 收款或付款状态
     */
    private String state;
    /**
     * 是否收款
     */
    private String whether;
    /**
     * 收款日期
     */
    @TableField
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date time;
    /**
     * 交易流水表id
     */
    private Integer jiaoyi_id;
    /**
     * 备注
     */
    private String remark;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
